//package com.spic.business.mq.service;
//
//import com.rabbitmq.client.Channel;
//import com.spic.business.constant.RabbitMQConstant;
//import org.springframework.amqp.core.Message;
//import org.springframework.amqp.rabbit.annotation.Exchange;
//import org.springframework.amqp.rabbit.annotation.Queue;
//import org.springframework.amqp.rabbit.annotation.QueueBinding;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
///**
// * 消息监听者
// */
//@Component
//public class RabbitmqListener
//{
//    @Autowired
//    private DriverlessService driverlessService;
//
//    //    @RabbitListeners({@RabbitListener(queues = "position_report_queue")})
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue(value = RabbitMQConstant.QUEUE,//队列名称
//                    durable = RabbitMQConstant.DERABLE),//是否持久化
//            exchange = @Exchange(value = RabbitMQConstant.EXCHANGE, //交换机名称
//                    durable = RabbitMQConstant.DERABLE,//是否持久化o
//                    type = RabbitMQConstant.TYPE, //消息路由规则
//                    ignoreDeclarationExceptions = RabbitMQConstant.IGNOREDECEXCEPTION), // 忽略声明异常
//            key = RabbitMQConstant.KEY // 绑定的路由键或模式。
//    )
//    )
//    public void reveiceMessage(String msg, Channel channel, Message message)
//    {
//        driverlessService.getMessageHandler(msg);
//
//    }
//}
